negotiator.boaframework.offeringstrategy.anac2011
Class TheNegotiator_Offering

java.lang.Object
  extended by negotiator.boaframework.OfferingStrategy
      extended by negotiator.boaframework.offeringstrategy.anac2011.TheNegotiator_Offering

public class TheNegotiator_Offering
extends OfferingStrategy

This is the decoupled Offering Strategy for TheNegotiator (ANAC2011). The code was taken from the ANAC2011 TheNegotiator and adapted to work within the BOA framework. Adapted to be compatible with an opponent model. DEFAULT OM: None

Version:
27-12-11
Author:
Alex Dirkzwager, Mark Hendrikx

Field Summary
 
Fields inherited from class negotiator.boaframework.OfferingStrategy
endNegotiation, helper, negotiationSession, nextBid, omStrategy, opponentModel
 
Constructor Summary
TheNegotiator_Offering()
          Empty constructor for the BOA framework.
 
Method Summary
 BidDetails determineNextBid()
          Determine the next bid.
 BidDetails determineOffer(int phase, double threshold)
          Determine what (counter)offer should be made in a given phase with a minimum threshold.
 BidDetails determineOpeningBid()
          Determines the first bid to be offered by the agent
 Bid getBestPartnerBids(double threshold)
          Get a partner bid which has a utility of at least a certain value.
 Bid getOwnBidBetween(double lowerThres, double upperThres)
           
 Bid getOwnBidBetween(double lowerThres, double upperThres, int counter)
          Get a random bid between two given thresholds.
 double getUpperThreshold(double threshold, double percentage)
          Calculate the upperthreshold based on the lowerthreshold and a given percentage.
 void init(NegotiationSession negoSession, OpponentModel model, OMStrategy oms, java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          Init required for the Decoupled Framework.
 
Methods inherited from class negotiator.boaframework.OfferingStrategy
endSession, getHelper, getNextBid, isEndNegotiation, loadData, setNextBid, storeData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TheNegotiator_Offering

public TheNegotiator_Offering()
Empty constructor for the BOA framework.

Method Detail

init

public void init(NegotiationSession negoSession,
                 OpponentModel model,
                 OMStrategy oms,
                 java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          throws java.lang.Exception
Init required for the Decoupled Framework.

Overrides:
init in class OfferingStrategy
Parameters:
negoSession - state of the negotiation.
model - opponent model which may be used.
oms - opponent model strategy which may be used.
parameters - optional parameters for the offering strategy.
Throws:
java.lang.Exception - if the offering strategy fails to initialize.

determineNextBid

public BidDetails determineNextBid()
Determine the next bid.

Specified by:
determineNextBid in class OfferingStrategy
Returns:
bid to offer to the opponent.

determineOffer

public BidDetails determineOffer(int phase,
                                 double threshold)
Determine what (counter)offer should be made in a given phase with a minimum threshold.

Parameters:
agentID - of our agent
phase - of the negotation
threshold - minimum threshold
Returns:
(counter)offer

getUpperThreshold

public double getUpperThreshold(double threshold,
                                double percentage)
Calculate the upperthreshold based on the lowerthreshold and a given percentage.

Parameters:
threshold -
percentage -
Returns:
upperbound on the threshold

getOwnBidBetween

public Bid getOwnBidBetween(double lowerThres,
                            double upperThres)

getOwnBidBetween

public Bid getOwnBidBetween(double lowerThres,
                            double upperThres,
                            int counter)
Get a random bid between two given thresholds.

Parameters:
lowerThres - lowerbound threshold
upperThres - upperbound threshold
Returns:
random bid between thresholds

getBestPartnerBids

public Bid getBestPartnerBids(double threshold)
Get a partner bid which has a utility of at least a certain value. Null is returned if no such bid exists.

Parameters:
threshold -
Returns:
bid with utility > threshold if exists

determineOpeningBid

public BidDetails determineOpeningBid()
Description copied from class: OfferingStrategy
Determines the first bid to be offered by the agent

Specified by:
determineOpeningBid in class OfferingStrategy
Returns:
the opening bid of the agent.